package com.yaorange.nongjt.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yaorange.nongjt.mapper.NjtCertificateMapper;
import com.yaorange.nongjt.domain.NjtCertificate;
import com.yaorange.nongjt.service.INjtCertificateService;

/**
 * 合格证Service业务层处理
 *
 * @author hzliu
 * @date 2025-03-02
 */
@Service
public class NjtCertificateServiceImpl implements INjtCertificateService
{
    @Autowired
    private NjtCertificateMapper njtCertificateMapper;

    public List<NjtCertificate> getNjtCertificateList(NjtCertificate query) {
        return njtCertificateMapper.selectNjtCertificateList(query);
    }

    public NjtCertificate getNjtCertificateById(Long id) {
        return njtCertificateMapper.selectNjtCertificateById(id);
    }

    /**
     * 查询合格证
     *
     * @param id 合格证主键
     * @return 合格证
     */
    @Override
    public NjtCertificate selectNjtCertificateById(Long id)
    {
        return njtCertificateMapper.selectNjtCertificateById(id);
    }

    /**
     * 查询合格证列表
     *
     * @param njtCertificate 合格证
     * @return 合格证
     */
    @Override
    public List<NjtCertificate> selectNjtCertificateList(NjtCertificate njtCertificate)
    {
        return njtCertificateMapper.selectNjtCertificateList(njtCertificate);
    }

    /**
     * 新增合格证
     *
     * @param njtCertificate 合格证
     * @return 结果
     */
    @Override
    public int insertNjtCertificate(NjtCertificate njtCertificate)
    {
        return njtCertificateMapper.insertNjtCertificate(njtCertificate);
    }

    /**
     * 修改合格证
     *
     * @param njtCertificate 合格证
     * @return 结果
     */
    @Override
    public int updateNjtCertificate(NjtCertificate njtCertificate)
    {
        return njtCertificateMapper.updateNjtCertificate(njtCertificate);
    }

    @Override
    public int deleteNjtCertificateByIds(Long[] ids) {
        return 0;
    }

    /**
     * 批量删除合格证
     *
     * @param ids 需要删除的合格证主键
     * @return 结果
     */
    public int deleteNjtCertificateByIds(List<Long> ids)
    {
        return njtCertificateMapper.deleteNjtCertificateByIds(ids);
    }

    /**
     * 删除合格证信息
     *
     * @param id 合格证主键
     * @return 结果
     */
    @Override
    public int deleteNjtCertificateById(Long id)
    {
        return njtCertificateMapper.deleteNjtCertificateById(id);
    }

}
